// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'
import Client from '@api/base/api/DeviceDetailApi'

import EditClass from '@api/base/model/BatchUpdateDeviceReq'
import TagClass from '@api/base/model/DeviceLabelDto'

const CLIENT = CORE.grpcCLIENT(Client)
const TAG = [TagClass, 'deviceLabelDtos', 1]

// ============================== 导出远程接口 ============================== //

export default {
  // —————————————————————————————— 改 —————————————————————————————— //

  async edit(one, TIP = '批量处理') {
    const DTO = CORE.grpcDTO(EditClass, one, TAG)
    await CORE.grpc(TIP, CLIENT, 'batchUpdateDevice', DTO)
    return CORE.grpcOK(TIP)
  },
}
